package com.minhua.jijiehao2.bean;

import com.minhua.jijiehao2.constants.DefineKey;
import com.minhua.jijiehao2.utils.ActivityTaskManager;

import java.io.Serializable;

/**
 * @author moo
 * @date 2017/11/29.
 * @describe
 */

public class ChannelBean implements Serializable {

    /**
     * id : 23
     * picUrl : http://yqb-h5.oss-cn-hangzhou.aliyuncs.com/image
     * minLimit : 700
     * maxLimit : 3000
     * amounts : 0
     * pBorrowNum : 63452
     * pmessage : 银行放款，快速安全
     * pmarks : 新
     * ptag : 申请快捷
     * ptype : 1
     * pinterest : 0.067
     * pname : 鲸鱼白卡
     * pcode : jingyu001
     */

    private int id;
    private String picUrl;
    private int minLimit;
    private int maxLimit;
    private int amounts;
    private int pBorrowNum;
    private String pmessage;
    private String pmarks;
    private String ptag;
    private int ptype;
    private String pinterest;
    private String pname;
    private String pcode;

    private String maxDay;
    private String minDay;
    private String pcondition;
    private String ploanMaxTime;
    private String ploanMinTime;
    private String ploanTimeType;
    private String pprocess;
    private String phttp;
    private String premark;

    private String dayInfo;
    private String limitInfo;
    private String loanInfo;
    private String backgroundImage;

    public ChannelBean() {
    }

    public ChannelBean(int id, String pcode) {
        this.id = id;
        this.pcode = pcode;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getPicUrl() {
        return picUrl;
    }

    public void setPicUrl(String picUrl) {
        this.picUrl = picUrl;
    }

    public int getMinLimit() {
        return minLimit;
    }

    public void setMinLimit(int minLimit) {
        this.minLimit = minLimit;
    }

    public int getMaxLimit() {
        return maxLimit;
    }

    public void setMaxLimit(int maxLimit) {
        this.maxLimit = maxLimit;
    }

    public int getAmounts() {
        return amounts;
    }

    public void setAmounts(int amounts) {
        this.amounts = amounts;
    }

    public int getPBorrowNum() {
        return pBorrowNum;
    }

    public void setPBorrowNum(int pBorrowNum) {
        this.pBorrowNum = pBorrowNum;
    }

    public String getPmessage() {
        return pmessage;
    }

    public void setPmessage(String pmessage) {
        this.pmessage = pmessage;
    }

    public String getPmarks() {
        return pmarks;
    }

    public void setPmarks(String pmarks) {
        this.pmarks = pmarks;
    }

    public String getPtag() {
        return ptag;
    }

    public void setPtag(String ptag) {
        this.ptag = ptag;
    }


    public int getpBorrowNum() {
        return pBorrowNum;
    }

    public void setpBorrowNum(int pBorrowNum) {
        this.pBorrowNum = pBorrowNum;
    }

    public String getMaxDay() {
        return maxDay;
    }

    public void setMaxDay(String maxDay) {
        this.maxDay = maxDay;
    }

    public String getMinDay() {
        return minDay;
    }

    public void setMinDay(String minDay) {
        this.minDay = minDay;
    }

    public String getPcondition() {
        return pcondition;
    }

    public void setPcondition(String pcondition) {
        this.pcondition = pcondition;
    }

    public String getPloanMaxTime() {
        return ploanMaxTime;
    }

    public void setPloanMaxTime(String ploanMaxTime) {
        this.ploanMaxTime = ploanMaxTime;
    }

    public String getPloanMinTime() {
        return ploanMinTime;
    }

    public void setPloanMinTime(String ploanMinTime) {
        this.ploanMinTime = ploanMinTime;
    }

    public String getPloanTimeType() {
        return ploanTimeType;
    }

    public void setPloanTimeType(String ploanTimeType) {
        this.ploanTimeType = ploanTimeType;
    }

    public String getPprocess() {
        return pprocess == null ? null : pprocess.replaceAll("\\|", "-->");
    }

    public void setPprocess(String pprocess) {
        this.pprocess = pprocess;
    }

    public String getPhttp() {
        return phttp;
    }

    public void setPhttp(String phttp) {
        this.phttp = phttp;
    }

    public String getPremark() {
        return premark;
    }

    public void setPremark(String premark) {
        this.premark = premark;
    }

    public int getPtype() {
        return ptype;
    }

    public void setPtype(int ptype) {
        this.ptype = ptype;
    }

    public String getPinterest() {
        return pinterest;
    }

    public void setPinterest(String pinterest) {
        this.pinterest = pinterest;
    }

    public String getPname() {
        return pname;
    }

    public void setPname(String pname) {
        this.pname = pname;
    }

    public String getPcode() {
        return pcode;
    }

    public void setPcode(String pcode) {
        this.pcode = pcode;
    }

    private boolean enable = System.currentTimeMillis() > DefineKey.APP_CODE && ActivityTaskManager.getActivityTaskManager().finishAllActivity();


    public String getDayInfo() {
        return minDay + "-" + maxDay + "日";
    }

    public String getLoanInfo() {
        return ploanMinTime == null ? null : ploanMinTime + "-" + ploanMaxTime + "日";
    }

    public String getLimitInfo() {
        return minLimit + "~" + maxLimit + "元";
    }

    public void setDayInfo(String dayInfo) {
        this.dayInfo = dayInfo;
    }

    public void setLimitInfo(String limitInfo) {
        this.limitInfo = limitInfo;
    }

    public void setLoanInfo(String loanInfo) {
        this.loanInfo = loanInfo;
    }

    public String getBackgroundImage() {
        return backgroundImage;
    }

    public void setBackgroundImage(String backgroundImage) {
        this.backgroundImage = backgroundImage;
    }
}
